Integrand size = 23, antiderivative size = 184 \[ \int \frac {\sqrt {\cos (c+d x)}}{(a+b \sec (c+d x))^2} \, dx=\frac {\left (2 a^2-3 b^2\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{a^2 \left (a^2-b^2\right ) d}-\frac {b \left (4 a^2-3 b^2\right ) \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{a^3 \left (a^2-b^2\right ) d}+\frac {b^2 \left (5 a^2-3 b^2\right ) \operatorname {EllipticPi}\left (\frac {2 a}{a+b},\frac {1}{2} (c+d x),2\right )}{a^3 (a-b) (a+b)^2 d}+\frac {b^2 \sin (c+d x)}{a \left (a^2-b^2\right ) d \sqrt {\cos (c+d x)} (a+b \sec (c+d x))} \]
[Out]
Time = 0.60 (sec) , antiderivative size = 184, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.391, Rules used = {4349, 3932, 4191, 3934, 2884, 3872, 3856, 2719, 2720} \[ \int \frac {\sqrt {\cos (c+d x)}}{(a+b \sec (c+d x))^2} \, dx=\frac {\left (2 a^2-3 b^2\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{a^2 d \left (a^2-b^2\right )}+\frac {b^2 \sin (c+d x)}{a d \left (a^2-b^2\right ) \sqrt {\cos (c+d x)} (a+b \sec (c+d x))}-\frac {b \left (4 a^2-3 b^2\right ) \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{a^3 d \left (a^2-b^2\right )}+\frac {b^2 \left (5 a^2-3 b^2\right ) \operatorname {EllipticPi}\left (\frac {2 a}{a+b},\frac {1}{2} (c+d x),2\right )}{a^3 d (a-b) (a+b)^2} \]
[In]
[Out]
Rule 2719
Rule 2720
Rule 2884
Rule 3856
Rule 3872
Rule 3932
Rule 3934
Rule 4191
Rule 4349
Rubi steps \begin{align*} \text {integral}& = \left (\sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {1}{\sqrt {\sec (c+d x)} (a+b \sec (c+d x))^2} \, dx \\ & = \frac {b^2 \sin (c+d x)}{a \left (a^2-b^2\right ) d \sqrt {\cos (c+d x)} (a+b \sec (c+d x))}-\frac {\left (\sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {-a^2+\frac {3 b^2}{2}+a b \sec (c+d x)-\frac {1}{2} b^2 \sec ^2(c+d x)}{\sqrt {\sec (c+d x)} (a+b \sec (c+d x))} \, dx}{a \left (a^2-b^2\right )} \\ & = \frac {b^2 \sin (c+d x)}{a \left (a^2-b^2\right ) d \sqrt {\cos (c+d x)} (a+b \sec (c+d x))}-\frac {\left (\sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {a \left (-a^2+\frac {3 b^2}{2}\right )-\left (-a^2 b+b \left (-a^2+\frac {3 b^2}{2}\right )\right ) \sec (c+d x)}{\sqrt {\sec (c+d x)}} \, dx}{a^3 \left (a^2-b^2\right )}+\frac {\left (b^2 \left (5-\frac {3 b^2}{a^2}\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {\sec ^{\frac {3}{2}}(c+d x)}{a+b \sec (c+d x)} \, dx}{2 a \left (a^2-b^2\right )} \\ & = \frac {b^2 \sin (c+d x)}{a \left (a^2-b^2\right ) d \sqrt {\cos (c+d x)} (a+b \sec (c+d x))}+\frac {\left (b^2 \left (5 a^2-3 b^2\right )\right ) \int \frac {1}{\sqrt {\cos (c+d x)} (b+a \cos (c+d x))} \, dx}{2 a^3 \left (a^2-b^2\right )}+\frac {\left (\left (2 a^2-3 b^2\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {1}{\sqrt {\sec (c+d x)}} \, dx}{2 a^2 \left (a^2-b^2\right )}-\frac {\left (b \left (4 a^2-3 b^2\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \sqrt {\sec (c+d x)} \, dx}{2 a^3 \left (a^2-b^2\right )} \\ & = \frac {b^2 \left (5 a^2-3 b^2\right ) \operatorname {EllipticPi}\left (\frac {2 a}{a+b},\frac {1}{2} (c+d x),2\right )}{a^3 (a-b) (a+b)^2 d}+\frac {b^2 \sin (c+d x)}{a \left (a^2-b^2\right ) d \sqrt {\cos (c+d x)} (a+b \sec (c+d x))}+\frac {\left (2 a^2-3 b^2\right ) \int \sqrt {\cos (c+d x)} \, dx}{2 a^2 \left (a^2-b^2\right )}-\frac {\left (b \left (4 a^2-3 b^2\right )\right ) \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx}{2 a^3 \left (a^2-b^2\right )} \\ & = \frac {\left (2 a^2-3 b^2\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{a^2 \left (a^2-b^2\right ) d}-\frac {b \left (4 a^2-3 b^2\right ) \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{a^3 \left (a^2-b^2\right ) d}+\frac {b^2 \left (5 a^2-3 b^2\right ) \operatorname {EllipticPi}\left (\frac {2 a}{a+b},\frac {1}{2} (c+d x),2\right )}{a^3 (a-b) (a+b)^2 d}+\frac {b^2 \sin (c+d x)}{a \left (a^2-b^2\right ) d \sqrt {\cos (c+d x)} (a+b \sec (c+d x))} \\ \end{align*}
Time = 2.06 (sec) , antiderivative size = 252, normalized size of antiderivative = 1.37 \[ \int \frac {\sqrt {\cos (c+d x)}}{(a+b \sec (c+d x))^2} \, dx=\frac {\frac {4 b^2 \sqrt {\cos (c+d x)} \sin (c+d x)}{\left (a^2-b^2\right ) (b+a \cos (c+d x))}+\frac {\frac {2 \left (2 a^2-b^2\right ) \operatorname {EllipticPi}\left (\frac {2 a}{a+b},\frac {1}{2} (c+d x),2\right )}{a+b}+8 b \left (-\operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )+\frac {b \operatorname {EllipticPi}\left (\frac {2 a}{a+b},\frac {1}{2} (c+d x),2\right )}{a+b}\right )+\frac {2 \left (2 a^2-3 b^2\right ) \left (-2 a b E\left (\left .\arcsin \left (\sqrt {\cos (c+d x)}\right )\right |-1\right )+2 b (a+b) \operatorname {EllipticF}\left (\arcsin \left (\sqrt {\cos (c+d x)}\right ),-1\right )+\left (a^2-2 b^2\right ) \operatorname {EllipticPi}\left (-\frac {a}{b},\arcsin \left (\sqrt {\cos (c+d x)}\right ),-1\right )\right ) \sin (c+d x)}{a^2 b \sqrt {\sin ^2(c+d x)}}}{(a-b) (a+b)}}{4 a d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(808\) vs. \(2(260)=520\).
Time = 15.01 (sec) , antiderivative size = 809, normalized size of antiderivative = 4.40
[In]
[Out]
\[ \int \frac {\sqrt {\cos (c+d x)}}{(a+b \sec (c+d x))^2} \, dx=\int { \frac {\sqrt {\cos \left (d x + c\right )}}{{\left (b \sec \left (d x + c\right ) + a\right )}^{2}} \,d x } \]
[In]
[Out]
\[ \int \frac {\sqrt {\cos (c+d x)}}{(a+b \sec (c+d x))^2} \, dx=\int \frac {\sqrt {\cos {\left (c + d x \right )}}}{\left (a + b \sec {\left (c + d x \right )}\right )^{2}}\, dx \]
[In]
[Out]
\[ \int \frac {\sqrt {\cos (c+d x)}}{(a+b \sec (c+d x))^2} \, dx=\int { \frac {\sqrt {\cos \left (d x + c\right )}}{{\left (b \sec \left (d x + c\right ) + a\right )}^{2}} \,d x } \]
[In]
[Out]
\[ \int \frac {\sqrt {\cos (c+d x)}}{(a+b \sec (c+d x))^2} \, dx=\int { \frac {\sqrt {\cos \left (d x + c\right )}}{{\left (b \sec \left (d x + c\right ) + a\right )}^{2}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {\sqrt {\cos (c+d x)}}{(a+b \sec (c+d x))^2} \, dx=\int \frac {\sqrt {\cos \left (c+d\,x\right )}}{{\left (a+\frac {b}{\cos \left (c+d\,x\right )}\right )}^2} \,d x \]
[In]
[Out]